<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8" />
    <title>anchor null</title>
</head>

<body>
    <a href="#" id="homeLink">返回首页</a>
    <p>为演示空链接显示页面，表示浏览其他页面</p>
    <script>
        document.getElementById('homeLink').addEventListener('click', function (event) {
            event.preventDefault(); // 阻止默认的锚点行为
            window.location.href = './index.html'; // 将页面跳转回首页
        });
    </script>
</body>

</html>